package com.tian.mall;

/**
 * @author zhumengping
 * @title: EmailBuilder
 * @projectName zhump-cloud
 * @date 2023/8/2 17:16
 */
public class EmailBuilder {

    private EmailRequestEntity request = new EmailRequestEntity();

    public EmailBuilder serverName(String serverName){
        request.setServerName(serverName);
        return this;
    }

    public EmailBuilder channel(ChannelEnums channelEnums){
        request.setChannel(channelEnums);
        return this;
    }

    public EmailBuilder sendMail(String sendMail){
        request.setSendMail(sendMail);
        return this;
    }
    public EmailBuilder sendMailPwd(String sendMailPwd){
        request.setSendMailPwd(sendMailPwd);
        return this;
    }

    public EmailBuilder sendContent(String sendContent){
        request.setSendContent(sendContent);
        return this;
    }
    public EmailBuilder receiveMail(String receiveMail){
        request.setReceiveMail(receiveMail);
        return this;
    }

    public EmailBuilder receiveName(String receiveName){
        request.setServerName(receiveName);
        return this;
    }

    public EmailBuilder mailType(MailTypeEnums mailType){
        request.setMailType(mailType);
        return this;
    }
    public EmailBuilder subject(String subject){
        request.setSubject(subject);
        return this;
    }

    public EmailRequestEntity build(){
        return request;
    }

}
